package ExerciseOne;

import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;

public class Callable1Test {
	public static void main(String[] args) {
		MyCallable m = new MyCallable();
		FutureTask fu = new FutureTask(m);
		Thread t = new Thread(fu);
		t.start();
	}

}

class MyCallable implements Callable
{

	@Override
	public Object call() throws Exception {
		for(int i=0;i<100;i++)
		{
			if(i%2==0)
			{
				System.out.println(Thread.currentThread().getName()+":"+i);
			}
		}
		return 0;
	}
	
}
